﻿@model Home.Site.Models.DataLayer.Review
@section head
{
    <meta name="title" content="@Model.Title" />
    <meta name="description" content="@Model.MiniContent" />
    <link rel="image_src" href="@Model.MainImage" />
}
@{
    ViewBag.Title = @Model.Title;
    ViewBag.Description = @Model.MiniContent;
}
@{
    <div id="review">
        <h3 class="header">@Model.Title</h3>
        <div>
            <i class="icon-calendar" title="Дата публикации"></i>&nbsp;@String.Format("{0:g}", Model.DatePublish.ToShortDateString())<br />
            <i class="icon-user" title="Автор"></i>&nbsp;<a href="/userinfo/@Model.Author.Replace('/', '^')">@Model.CreateUser</a>
            @{
                Html.RenderPartial("Account/Gravatar", Model.CreateUser);
            }
        </div>
        @Html.Raw(@Model.MainContent)
        @if (@Model.FileName != null || !string.IsNullOrEmpty(@Model.FileName))
        {
            <p><a href="@Model.FileName" class="btn btn-success">Скачать</a></p>
        }
        @if (Model.ReviewTags.Count > 0)
        {
            <hr />
            <div>
                <b>Теги:&nbsp;</b>
                @foreach (var tag in Model.ReviewTags)
                {
                    var url = string.Format("/Review/Search?type={0}&searchText={1}", @ViewBag.Type, @tag.TagName);
                    <span><a href="@url">@tag.TagName</a>&nbsp;|&nbsp;</span>
                }
            </div>
        }
        <hr />
        <div>
            <span class="social_share" data-type="vk" data-icon="&#xe002;" title="Поделиться"></span>
            <span class="social_share" data-type="fb" data-icon="&#xe021;" title="Поделиться"></span>
            <span class="social_share" data-type="tw" data-icon="&#xe005;" title="Поделиться"></span>
            <span class="social_share" data-type="lj" data-icon="&#xe016;" title="Поделиться"></span>
        </div>
        <hr />
        <div>
            @{ Html.RenderPartial("_RelativeReviews", (Home.Site.Models.DataLayer.Review[])ViewBag.RelativeReviews); }
        </div>
        <hr />
        <br />
        <div id="disqus_thread"></div>
        <script type="text/javascript">
            var disqus_shortname = 'promike';
            (function () { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();
        </script>
        <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
        <br />
        <h3>
            <a href="@ViewBag.BackUrl"><< Назад</a>
        </h3>
    </div>
}
@section Scripts {
    @Scripts.Render("~/bundles/vk_upback")
}
